package com.je21121.service;

import com.je21121.dao.UserDao;
import com.je21121.model.UserInfo;

import java.util.List;

//  判断逻辑  service
public class UserService {
    // 创建userdao对象
    UserDao userDao = new UserDao();

    public boolean userlogin(UserInfo userInfo){
        return userDao.userlogin(userInfo);
    }

    // 注册用户   这里什么都不写  以后会写
    public boolean addUser(UserInfo userInfo) {
        return userDao.addUser(userInfo);
    }

    public List<UserInfo> getUserlist(UserInfo userInfo) {
        return userDao.getUserlist(userInfo);
    }

    public boolean deleteUser(Integer[] uids) {
        return userDao.deleteUser(uids);
    }

    public UserInfo getuser(UserInfo u) {
        return userDao.getuser(u);
    }

    public boolean updateuser(UserInfo userInfo) {
        return userDao.updateuser(userInfo);
    }

    public int getUserCount(String username) {
        return userDao.getUserCount(username);
    }
}
